package com.kaifamiao.month05.day09;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Test {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        Callable<Integer> call = new MyCallable();
        FutureTask<Integer> task = new FutureTask<>(call);
        Thread t = new Thread(task);
        t.start();

        int sum = task.get();
        System.out.println(sum);
        System.out.println("❤".length());
        System.out.println("❤");

    }
}
